rm(list = ls())
library(mvtnorm)
library(plotly)
library(patchwork)
y <- x <- seq(-3,3,0.05)
z <- matrix(NA, nrow = length(x), ncol = length(x))
for (i in 1:length(x)) {
  z[i,] <- dmvnorm(data.frame(x[i],y))
}

plotly::plot_ly(x = ~x, y = ~y, z = ~z, type = 'surface')

